﻿using System.Collections.Generic;

public class BubbleTipsController : ControllerBase
{
	private BubbleTipsWin _win;
	private readonly Queue<string> _tipsList;

	public BubbleTipsController()
	{
		_windowPath = Window.BubbleTipsWin;
		_tipsList = new Queue<string>();
	}

	protected override void Init()
	{
		base.Init();
		_win = _mono as BubbleTipsWin;
		_win.Controller = this;
	}

	public void UpdateInfo(string tip)
	{
		_tipsList.Enqueue(tip);
		if (_win != null) _win.UpdateInfo();
		else WindowManager.GetInstance().OpenWindow(Window.BubbleTipsWin);
	}

	override public void Destroy()
	{
		base.Destroy();
		_win.Controller = null;
		_win = null;
	}

	public Queue<string> TipsList { get { return _tipsList; } }
}